home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
prlbkxmp.lha
/
ch5
/
retnull.eg
< prev
next >
Wrap
Text File
|
1991-01-08
|
338b
|
17 lines
sub files {
local(*DH);
opendir(DH, $_[0]) || return 0;
local(@f) = sort grep(!/^\.\.?$/, readdir(DH));
closedir(DH);
return 1, @f;
}
{
local(@return) = &files($ENV{HOME} || $ENV{LOGDIR});
if (shift @return) {
print "home files are @return\n";
} else {
print "cannot read home directory: $!\n";
}
}